/*
 * Created on May 12, 2005
 */
package org.vectrics.skill.struts;

import org.vectrics.common.html.Form;
import org.vectrics.common.pagelist.PageList;
import org.vectrics.skill.Skill;
import org.vectrics.skill.SkillRating;
import org.vectrics.skill.SkillSearchCriteria;
import org.vectrics.skill.struts.pagelist.SkillPageListTag;

/**
 * @author MMoore
 */
public class JobSkillSelectPageListTag extends SkillPageListTag {

	private static final long serialVersionUID = -261605392476599349L;
	private String jobId = null;
	private Form form = new Form();
	
	public JobSkillSelectPageListTag() {
		super();
	}
	
	@Override
	protected Form createForm() {
		return this.form;
	}

	@Override
	protected boolean getAllowRatingEntry() {
		return false;
	}

	@Override
	protected SkillRating getSkillRating(Skill skill) {
		return null;
	}

	protected String getSkillFormAction() {
		return("/hrs-intranet/admin/jobs/skills/select.do");
	}
	
	protected void onFormCreate(Form form) {
		form.addHidden("jobId", this.getJobId());
	}
	protected boolean getMakeCheckBoxes() {
		return(true);
	}
	
	/*	
	protected String getPageListLink() {
		return "/hrs-intranet/admin/jobs/skills/select";
	}*/

	protected PageList createPageList() {
		SkillSearchCriteria criteria = new SkillSearchCriteria();
		SkillPageList pageList = new SkillPageList(criteria);
		pageList.setPageSize(15);
		return pageList;
	}
	
	public String getJobId() {
		return jobId;
	}

	public void setJobId(String jobId) {
		this.jobId = jobId;
	}
	
	@Override
	protected String getFormAction() {
		return this.getContextPath() + "/admin/user/skill/skillListEntryFinished.do";
	}


	@Override
	protected String getPageListLink() {
		return this.getContextPath() + "/admin/user/skill/skillListEntry.do";
	}
	
	
	@Override
	protected String getFinishLink() {
		return this.getContextPath() + "/admin/user/skill/saveSkillListEntry.do";
	}

}
